package com.uzai.console.web.stats;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.uzai.console.dto.device.DeviceQuery;
import com.uzai.console.dto.main.main.RechargeDto;
import com.uzai.console.dto.main.notice.NoticeIdDto;
import com.uzai.console.dto.main.notice.NoticeQuery;
import com.uzai.console.dto.main.updatelog.UpdateLogIdDto;
import com.uzai.console.dto.main.updatelog.UpdateLogQuery;
import com.uzai.console.dto.stats.OrderProfitStatsDto;
import com.uzai.console.dto.stats.OrderProfitStatsQuery;
import com.uzai.console.entity.UserTakeBal;
import com.uzai.console.service.device.DeviceService;
import com.uzai.console.service.main.MainService;
import com.uzai.console.service.main.NoticeService;
import com.uzai.console.service.main.UpdateLogService;
import com.uzai.console.service.stats.OrderProfitService;
import com.uzai.console.vo.device.DeviceInfoVo;
import com.uzai.console.vo.main.main.*;
import com.uzai.console.vo.main.notice.NoticeInfoVo;
import com.uzai.console.vo.main.updatelog.UpdateLogInfoVo;
import com.uzai.console.vo.stats.orderprofit.OrderProfitPageVo;
import com.uzai.console.vo.stats.orderprofit.OrderProfitResultVo;
import com.uzai.console.vo.stats.orderprofit.OrderProfitStatsVo;
import com.uzai.console.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 登录日志
 * @author liuqi
 * @date 2021年08月16日 15:11
 */
@Api(value = "订单收益(作废)",tags = "统计报表|订单收益(作废)")
@ApiSort(50)
@RestController
public class OrderProfitController extends BaseController {
    private Logger logger = LoggerFactory.getLogger(OrderProfitController.class);

    @Autowired
    private OrderProfitService orderProfitService;
    @Autowired
    private DeviceService deviceService;

//    @ApiOperation(value = "统计订单收益", notes = "统计订单收益", response = OrderProfitStatsVo.class)
//    @ApiOperationSupport(order = 1)
//    @PostMapping("/stats/orderProfit/findOrderProfitStats")
//    public Object findOrderProfitStats(@RequestBody OrderProfitStatsDto orderProfitStatsDto){
//        return orderProfitService.findOrderProfitStats(orderProfitStatsDto);
//    }
//
//    @ApiOperation(value = "分页查询订单收益", notes = "分页查询订单收益", response = OrderProfitPageVo.class)
//    @ApiOperationSupport(order = 2)
//    @PostMapping("/stats/orderProfit/findOrderProfitStatsPage")
//    public Object findOrderProfitStatsPage(@RequestBody OrderProfitStatsQuery orderProfitStatsQuery){
//        //返回公告信息
//        return orderProfitService.findOrderProfitStatsPage(orderProfitStatsQuery);
//    }

    @ApiOperation(value = "查询机器人下拉列表", notes = "查询机器人下拉列表", response = DeviceInfoVo.class)
    @ApiOperationSupport(order = 3)
    @PostMapping("/stats/orderProfit/findDeviceList")
    public Object findDeviceList(@RequestBody DeviceQuery deviceQuery) {
        deviceQuery.setMerId(getLoginInfo().getMerId());
        return deviceService.findDeviceList(deviceQuery);
    }

}
